/*******************************************************************************
 * Copyright (c) 2010, 2030 www.itlaobing.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package cn.itlaobing.shopping.service;

import java.sql.SQLException;
import java.util.List;

import cn.itlaobing.shopping.dao.ShopDao;
import cn.itlaobing.shopping.exception.BusinessExceeption;
import cn.itlaobing.shopping.model.OrderModel;

/** 
 * ClassName: ShopService <br/> 
 * Function: 业务类<br/> 
 * date: 2017年11月1日 下午12:52:06 <br/> 
 * 
 * @author 王建蕊 
 * @version 1.0 
 * @since JDK 1.8 
 */
public class ShopService {
	private ShopDao sd=new ShopDao();
	public List<OrderModel> query(int uid)throws BusinessExceeption{
		List<OrderModel> list=null;
		try {
			list=sd.query(uid);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			throw new BusinessExceeption(e.getMessage());
		} catch (SQLException e) {
			e.printStackTrace();
			throw new BusinessExceeption(e.getMessage());
		}finally {
			try {
				sd.close();
			} catch (SQLException e) {
				e.printStackTrace();
				throw new BusinessExceeption(e.getMessage());
			}
		}
		return list;
	}
}
